<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../libs/vue.js"></script>
</head>
<body>
    <div id="app">
        <a href="http://www.baidu.com" @click.prevent="getFun" target="_blank">点击跳转到百度</a>
    </div>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{

            },
            methods: {
                getFun(e){
                    // 原生js阻止默认行为
                    // e.preventDefault();
                    console.log('被点击了')
                }
            },
        })
    </script>
</body>
</html>